<template>
    <view :class="['header', theme]" :style="'height:' + customBar + 'px;'">
        <view :class="['home-nav', theme]" :style="computedStyle">
            <view class="nav-content">
                <view class="title">
                    <image class="logo" mode="heightFix" :src="logo"></image>
                </view>
            </view>
        </view>
    </view>
</template>

<script>
import tabBar from '@/components/TabBar/tabBar';
(global.webpackJsonp = global.webpackJsonp || []).push([
    ['components/HomeNavbar/HomeNavbar'],
    {
        '02a4': function (t, e, n) {},
        '093e': function (t, e, n) {
            'use strict';

            n.d(e, 'b', function () {
                return o;
            });
            n.d(e, 'c', function () {
                return a;
            });
            n.d(e, 'a', function () {});
            var o = function () {
                this.$createElement;
                this._self._c;
            };
            var a = [];
        },
        '3cce': function (t, e, n) {
            'use strict';

            n.r(e);
            var o = n('093e');
            var a = n('f90e');
            for (var c in a) {
                if (['default'].indexOf(c) < 0) {
                    (function (t) {
                        n.d(e, t, function () {
                            return a[t];
                        });
                    })(c);
                }
            }
            n('fba9');
            var r = n('f0c5');
            var i = Object(r.a)(a.default, o.b, o.c, false, null, null, null, false, o.a, void 0);
            e.default = i.exports;
        },
        c9a7: function (t, e, n) {
            'use strict';

            (function (t) {
                Object.defineProperty(e, '__esModule', {
                    value: true
                });
                e.default = void 0;
                var n = {
                    name: 'HomeNav',
                    props: {
                        current: Number,
                        theme: {
                            type: String,
                            default: function () {
                                return 'black';
                            }
                        },
                        bgColor: {
                            type: String,
                            default: function () {
                                return 'white';
                            }
                        },
                        title: {
                            type: String
                        },
                        searchType: {
                            type: String,
                            default: function () {
                                return 'box';
                            }
                        }
                    },
                    data: function () {
                        return {
                            tabs: ['全部', '新品', '推荐'],
                            customBar: 64,
                            contentStyle: 64
                        };
                    },
                    computed: {
                        deviceInfo: function () {
                            return this.$store.getters.deviceInfo;
                        },
                        computedStyle: function () {
                            if ('white' === this.theme) {
                                var t = 'background:'.concat(this.bgColor, ';');
                            } else {
                                var t = '';
                            }
                            return this.contentStyle + t;
                        },
                        logo: function () {
                            return this.$store.getters.setting.login_page.logo || '';
                        }
                    },
                    created: function () {
                        this.customBar = this.deviceInfo.customBar;
                        this.contentStyle = 'height:'.concat(this.deviceInfo.customBar, 'px;padding-top:').concat(this.deviceInfo.statusBar, 'px;');
                    },
                    methods: {
                        toSearch: function () {
                            t.navigateTo({
                                url: '/pages/search/index?type=' + this.searchType
                            });
                        },
                        handleClick: function (t) {
                            this.$emit('change', t.currentTarget.dataset.current);
                        }
                    }
                };
                e.default = n;
            }.call(this, n('543d').default));
        },
        f90e: function (t, e, n) {
            'use strict';

            n.r(e);
            var o = n('c9a7');
            var a = n.n(o);
            for (var c in o) {
                if (['default'].indexOf(c) < 0) {
                    (function (t) {
                        n.d(e, t, function () {
                            return o[t];
                        });
                    })(c);
                }
            }
            e.default = a.a;
        },
        fba9: function (t, e, n) {
            'use strict';

            var o = n('02a4');
            n.n(o).a;
        }
    }
]);
(global.webpackJsonp = global.webpackJsonp || []).push([
    'components/HomeNavbar/HomeNavbar-create-component',
    {
        'components/HomeNavbar/HomeNavbar-create-component': function (t, e, n) {
            n('543d').createComponent(n('3cce'));
        }
    },
    [['components/HomeNavbar/HomeNavbar-create-component']]
]);
</script>
<style>
@import './HomeNavbar.css';
</style>
